;;;; init-vcs  -  Settings for different VCS systems 
;;;;
;;;;  Evgeniy Sharapov, evgeniy.sharapov@gmail.com 
;;;;
;;;;

;; I need to deal with Visual Source Safe too
(when (require 'vc-vss nil t)
  '(progn 
     ;; (add-to-list 'exec-path
     ;;              "//InsertPathToVss/Microsoft Visual Studio/Vss/Win32")
     (setq 
      vc-vss-dirs '("X:")
      vc-vss-user "eugene,Pa$$w0rd")
     (add-to-list 'vc-handled-backends 'VSS)))

;; Subversion 
;(autoload 'svn-status "psvn" "Examine the status of Subversion
                                        ;working copy in directory DIR.")
(require 'psvn)

;; This is a little hacky since VC doesn't support git add internally
(eval-after-load 'vc
  (define-key vc-prefix-map "i" '(lambda () (interactive)
                                   (if (not (eq 'Git (vc-backend buffer-file-name)))
                                       (vc-register)
                                     (shell-command (format "git add %s" buffer-file-name))
                                     (message "Staged changes.")))))

;(global-set-key (kbd "C-x g") 'magit-status)

(provide 'init-vcs)
